package com.yanqu.road.server.cmd.activity.sonhai.cross;

import com.yanqu.road.entity.activity.args.ActivityValueParamArgs;
import com.yanqu.road.entity.enums.eGamePlayerEventType;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.SonHaiProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.command.CmdApi;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.activity.doublespring.DoubleSpringActivityModule;
import com.yanqu.road.server.gameplayer.module.activity.fund.ActivityFundModule;
import com.yanqu.road.server.manger.activity.sonhai.SonHaiActivityMgr;
import com.yanqu.road.server.protocol.Protocol;

@CmdApi(reqMsg = SonHaiProto.SonHaiScoreChangeFromCrossMsg.class, respMsg = SonHaiProto.SonHaiScoreChangeFromCrossMsg.class)
@Cmd(code = Protocol.S_SON_HAI_SCORE_CHANGE_FROM_CROSS,desc = "山海伏兽-积分变更-跨服返回")
public class SonHaiScoreChangeFromCrossCmd extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        SonHaiProto.SonHaiScoreChangeFromCrossMsg reqMsg = SonHaiProto.SonHaiScoreChangeFromCrossMsg.parseFrom(packet.getBytes());
        if (player != null) {
            //积分变更
            ActivityValueParamArgs args = new ActivityValueParamArgs(reqMsg.getActivityId(), reqMsg.getScore(), "");
            player.notifyListener(eGamePlayerEventType.SonHaiAchievement.getValue(), args);
        }
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
